
/* Layout */
import Layout from '@/layout'

export const constantRoutes = [
    {
        path: '/redirect',
        component: Layout,
        hidden: true,
        children: [
            {
                path: '/redirect/:path(.*)',
                component: () => import('@/views/redirect')
            }
        ]
    },

    {
        path: '/',
        redirect: '/loginFirst',
    },

    {
        path: '/index',
        component: Layout,     // 首页框架    Layout里面有一堆组件
        children: [
            {
                path: '',
                component: () => import('@/views/index'),
                name: 'Index',
                meta: { title: '首页', icon: 'dashboard', affix: true }
            }
        ]
    },

/*    {
        path: '/',
        component: Layout,     // 首页框架    Layout里面有一堆组件
        redirect: 'index',
        children: [
            {
                path: '/index',
                component: () => import('@/views/index'),
                name: 'Index',
                meta: { title: '首页', icon: 'dashboard', affix: true }
            }
        ]
    },*/

    {
        path: '/loginFirst',
        name: 'LoginFirst',
        component: () => import('@/views/login/LoginFirst'),
    },
    {
        path: '/goRegister',
        name: 'GoRegister',
        component: () => import( '@/views/register/GoRegister'),
        children: [{
            path: '/goRegister/:value',
            name: 'GoRegisterV',
            component: () => import('@/views/register/GoRegister'),
        },
            {
                path: '/goRegister/:value/:input',
                name: 'GoRegisterV',
                component: () => import('@/views/register/GoRegister'),
            },
        ]
    },
    {
        path: '/user',   //  跳转到个人中心
        component: Layout,
        hidden: true,
        redirect: 'noredirect',
        children: [
            {
                path: 'profile',
                component: () => import('@/views/system/user/profile'),
                name: 'Profile',
                meta: { title: '个人中心', icon: 'user' }
            },
            {
                path: 'update',
                component: () => import('@/views/system/user/update'),
                name: 'Update',
                meta: { title: '上传文件', icon: 'update' }
            },
            {
                path: 'virtual',
                component: () => import('@/views/system/user/virtual'),
                name: 'Virtual',
                meta: { title: '消息列表', icon: 'virtual' }
            },
            {
                path: 'virtual/list',
                component: () => import('@/views/system/user/virtual/list'),
                name: 'VirtualList',
                meta: { title: '虚拟列表', icon: 'virtualList' }
            },
            {
                path: 'canvas',
                component: () => import('@/views/system/user/canvas'),
                name: 'Canvas',
                meta: { title: 'canvas画布', icon: 'canvas' }
            },
            {
                path: 'index',
                component: () => import('@/views/system/user/index'),
                name: 'index',
                meta: { title: '用户管理', icon: 'index' }
            }
        ]
    },
    {
        path: '/role',   //  跳转到个人中心
        component: Layout,
        hidden: true,
        redirect: 'noredirect',
        children: [
            {
                path: 'index',
                component: () => import('@/views/system/role'),
                name: 'Profile',
                meta: { title: '角色管理', icon: 'user' }
            },
        ]
    },
    {
        path: '/menu',   //  跳转到个人中心
        component: Layout,
        hidden: true,
        redirect: 'noredirect',
        children: [
            {
                path: 'index',
                component: () => import('@/views/system/menu'),
                name: 'Menu',
                meta: { title: '菜单管理', icon: 'user' }
            },
        ]
    },
    {
        path: '/logininfor',   //  跳转到个人中心
        component: Layout,
        hidden: true,
        redirect: 'noredirect',
        children: [
            {
                path: 'index',
                component: () => import('@/views/system/logininfor'),
                name: 'Logininfor',
                meta: { title: '日志管理', icon: 'user' }
            },
        ]
    },
    {
        path: '/notice',   //  跳转到个人中心
        component: Layout,
        hidden: true,
        redirect: 'noredirect',
        children: [
            {
                path: 'index',
                component: () => import('@/views/system/notice'),
                name: 'Notice',
                meta: { title: '通知公告', icon: 'user' }
            },
        ]
    },
    {
        path: '/product/productStopList',
        name: 'ProductStopList',
        component: () => import('@/components/product/ProductStopList.vue'),
        meta: { title: '进入购买', icon: 'dashboard'}
    },
    {
        path: '/product/productType',
        name: 'ProductType',
        component: () => import('@/components/product/ProductType.vue'),
        meta: { title: '查看类别', icon: 'dashboard'}
    },
]
/*动态路由*/
export const dynamicRoutes = []
